import React from 'react';
import { AsyncCascader } from '@ecoding/components.antd';

const C = () => {
    return (
        <AsyncCascader 
            placeholder="请选择" 
            style={{width: "100%"}}
            ifaces={
                [
                    {
                        url: 'https://f2e-api.sciecomm.cn/f2e/mock/p1',
                        params: {
                            pid: 0
                        },
                        format: {
                            id: 'value',
                            name: 'label',
                            isLeaf: false
                        }
                    },
                    {
                        url: 'https://f2e-api.sciecomm.cn/f2e/mock/p2',
                        paramKey: "pid",
                        format: {
                            id: 'value',
                            name: 'label',
                            isLeaf: false
                        }
                    },
                    {
                        url: 'https://f2e-api.sciecomm.cn/f2e/mock/p3',
                        paramKey: "pid",
                        format: {
                            id: 'value',
                            name: 'label',
                            isLeaf: false
                        }
                    },
                    {
                        url: 'https://f2e-api.sciecomm.cn/f2e/mock/p4',
                        paramKey: "pid",
                        format: {
                            id: 'value',
                            name: 'label',
                            isLeaf: false
                        }
                    },
                    {
                        url: 'https://f2e-api.sciecomm.cn/f2e/mock/p5',
                        paramKey: "pid",
                        format: {
                            id: 'value',
                            name: 'label',
                            isLeaf: true
                        }
                    }
                ]
            }
        />
    );
}

export default C;